The present invention claims priority from Japanese Patent Application No. 2000-172452 filed Jun. 8, 2000, the contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a technique for standardizing computer programs used for control purposes. It relates in particular to a technique for running such programs more simply by standardizing their design, modification and major alteration. The invention also relates to a control system wherein a plurality of control modules are arranged in an hierarchical structure and serve to individually control a plurality of controlled elements contained within a single controlled system. The invention further relates to a control program for this control system.
2. Description of Related Art
A previously proposed structure of a control system provides a plurality of controlled elements in a single control system and a plurality of control modules for individually controlling these controlled elements, and controls these control modules hierarchically.
Regarding this control system, the present applicant has proposed a technique wherein all the control modules have a standardized set of modes and mode transitions, and the components of the overall control system are in an hierarchical structure (see U.S. patent application Ser. No. 09/244,846, hereinafter termed the xe2x80x9cprior applicationxe2x80x9d). In the present application, each control module is understood to be such a component.
The prior application will be described with reference to FIG. 12 and FIG. 13. FIG. 12 shows the overall configuration of a control system according to the prior application, while FIG. 13 is a block diagram of a control module according to the prior application. As shown in FIG. 12, according to the previously proposed control system there are provided a plurality of controlled elements E(0) to E(m) and a plurality of control modules M(0) to M(n) for individually controlling these controlled elements E(0) to E(m), and these control modules M(0) to M(n) are controlled hierarchically. Communication among the control modules is carried out by way of communication lines C(0) to C(n) and communication memory COM.
In this control system, even if a certain control module does not use one of the modes belonging to the basic module, that mode is still provided in conformity with the basic module. Moreover, the modes and mode transitions are not extended beyond those provided in the basic module. If there is a need to extend the modes and mode transitions available, another basic module is designed. All the control module modes and mode transitions are standardized in at least one closed control system. All sorts of control states can be designed by setting parameters for these modes and mode transitions in accordance with the conditions imposed by the control specification and the controlled elements.
Thus, by standardizing the modes and mode transitions that the control modules have in common, a control module can be treated in terms of the concept of a component of a control system, which can then be constructed by assembling such components. A further consequence of this approach is that the updating of a control system can be treated in terms of the concept of the replacement of components.
Thus, by standardizing the modes and mode transitions that the control modules have in common, a control module can be treated in terms of the concept of a component of a control system, which can then be constructed by assembling such components. A further consequence of this approach is that the updating of a control system can be treated in terms of the concept of the replacement of components.
In the present application, the applicant has focused on the fact that the control system of the prior application can be made even easier to use by employing a plurality of command types with different characteristics.
This can be achieved by for example providing a convenient command for dealing with circumstances that differ from normal operation, as when the control system is initialized, during maintenance and checking, or when a fault occurs. Alternatively, restrictions on controlled elements or the order in which these elements are controlled can easily be set by providing commands with different scopes. See Takano et al Application No. 09/801,790 filed Mar. 9, 2001.
Using these ideas, a desired sequence of operations can be executed by using job commands to elicit the functions of control modules, and by using state commands to cause these control modules to undergo state transitions. In addition, when a situation occurs that makes it desirable for control modules to undergo state transitions as a matter of urgency during the execution of a sequence, this can be achieved by means of an event command.
The term xe2x80x9cpre-emption processingxe2x80x9d will be used to denote the process wherein a command issuing source acquires in advance the right to issue a command to a control module that is the target of that command. Job commands and state commands are commands that require pre-emption processing to be carried out in advance in relation to the control module that is the target of the command, and they are commands that become valid for a pre-empted control module. As opposed to this, an event command does not require pre-emption processing to be carried out in advance, and can be issued to any desired control module.
Commands other than job commands spread to control modules hierarchically below the control module that has received the command. A state command spreads to hierarchically lower control modules that are not currently pre-empted by another command issuing source. From the outset, an event command does not require pre-emption processing, and spreads to all hierarchically lower control modules.
It may be noted that although pre-emption processing is not required in order to issue an event command, a control module that is the destination of an event command performs, either simultaneously with or subsequent to receipt of the event command, the same processing as when it is pre-empted. The control module is able to undergo appropriate state transitions in accordance with the state of hierarchically superior control modules after this processing is cancelled.
Furthermore, a control module that is connected hierarchically below a control module that is the destination of an event command should have an existing state of pre-emption cancelled when it receives the event command. The aforementioned xe2x80x9csame processing as when it is pre-emptedxe2x80x9d that is performed by a control module that is the destination of an event command includes, for example, recording information relating to the issuing source of that event command, and deleting this recorded information when the processing is cancelled. This enables the event command issuing source to recognize the validity or invalidity of the processing.
It has been found that if commands are issued and received using the system configuration of the prior application, the time required for a command to be transmitted to the relevant control modules is sometimes not negligible from the point of view of performing control.
For example, with the system configuration of the prior application, when a state command is issued to a particular control module, the control module that receives this state command looks up hierarchically lower control modules that are not currently pre-empted by another command issuing source, and causes the state command to propagate to all these hierarchically lower control modules. Each hierarchically lower control module that receives the propagated state command also looks up hierarchically lower control modules that are not currently pre-empted by other command issuing sources, and likewise causes the command to propagate to these modules. The command is transmitted to the required control modules by repeating this process.
Although the processing time at an individual control module is extremely short, the number of control modules can amount to several hundred, several thousand or even more, and in this case the overall processing time in the system as a whole may not be negligible from the point of view of control.
During this overall command transmission and processing time interval there will be control modules that have already received the command and control modules that have not yet received it, and because the modules are not synchronized, an erroneous control procedure could be carried out. Halting the control procedure during the command transmission and processing period might be considered as a means of avoiding this sort of situation, but halting a control procedure each time a command is issued results in inefficient control. To avoid this, the transmission and processing of a command is preferably carried out all at once in a short time.
The present invention has been devised in the light of this situation, and it is an object of the invention to provide a control system capable of transmitting and processing commands in a short time. It is a further object of the invention to provide a control system capable of coping easily with a plurality of different situations, and of simplifying control, by using a plurality of command types with different characteristics.
The present invention provides, in correspondence with a plurality of control modules, centralized registers in which commands can be written. It also provides, again in correspondence with a plurality of control modules, centralized registers for managing the pre-emption status of the control modules and their tree-configuration hierarchical relations.
When a command, and information relating to the destination of that command, arrive from a command issuing source, they are latched. While they are latched, the control modules to which the command is to be transmitted are specified in accordance with information recorded in the aforementioned registers for managing the pre-emption status and the hierarchical relations. When the control modules have been specified, the latched command is written in those regions of the aforementioned registers in which commands can be written that correspond to the control modules in question. This enables the command to be transmitted in a short time.
In other words, this invention is a control system having a plurality of control modules connected in tree-configuration hierarchical relations successively branching from top to bottom, and having means for transmitting prescribed commands to these control modules.
This invention has the following features. Namely, it provides a xe2x80x9ccommand write register groupxe2x80x9d having, in correspondence with the aforementioned control modules, a plurality of xe2x80x9ccommand write registersxe2x80x9d in which commands can be written; the aforementioned transmitting means has means for writing commands in the command write register group in accordance with the aforementioned tree-configuration hierarchical relations; and this writing means includes means for expressing the tree-configuration hierarchical relations by turning intersections of a switch matrix on or off prior to writing a command, and means for writing a prescribed command in the command write register group in accordance with signals instructing said writing, these signals having arrived via these intersections.
The present invention thus performs batch management of commands for all the control modules by centralizing a plurality of command write registers in one place in the form of a command write register group. It also expresses the tree-configuration hierarchical relations by turning intersections of a switch matrix on or off prior to writing a command, and inputs to the switch matrix signals instructing the writing of a command. As a result, these signals are output via the intersections of the switch matrix in accordance with the tree-configuration hierarchical relations, and a prescribed command can be written in command write registers.
Expressing the tree-configuration hierarchical relations in advance by turning intersections of the switch matrix on or off ensures that commands can be transmitted to and processed by the control modules in an extremely short time compared with the conventional method, according to which the tree-configuration hierarchical relations are found by retracing the address information during the process of writing the command.
Preferably, the invention provides pre-emption registers for recording, in correspondence with the control modules, the status of the pre-emption processing, and tree registers for recording, in correspondence with the control modules, the aforementioned tree-configuration hierarchical relations. The aforementioned means for writing commands preferably has means for identifying the type of command that has been issued; means which, when a state command has been identified, specifies, in accordance with the information recorded in the aforementioned pre-emption and tree registers, the control modules to which this state command will spread; means which, when an event command has been identified, specifies, in accordance with the information recorded in the aforementioned tree registers, the control modules to which this event command will spread; and means for writing commands to the aforementioned command write registers corresponding to these specified control modules.
The aforementioned means for writing commands is preferably provided with a switch matrix having X-axis and Y-axis signal lines, both sets of signal lines corresponding to the control modules. This switch matrix preferably has means whereby a signal instructing the writing of a command to a control module i, this signal having been output from X-axis signal line i, can be fed back as an input signal on Y-axis signal line i and then output via intersection (j, i) from X-axis signal line j as a signal instructing the writing of the command to control module j connected hierarchically below control module i.
By using a switch matrix to express the tree-configuration hierarchical relations and sending a signal instructing the writing of a command from a position corresponding to the hierarchically highest control module, a signal instructing the writing of a command can be sent to all hierarchically subordinate control modules.
In an alternative configuration, a plurality of the aforementioned switch matrices are provided, and the aforementioned means for writing commands includes means whereby a signal instructing the writing of a command to a control module i that is dealt with by another switch matrix, this signal having been output from X-axis signal line h, is used as an input signal on Y-axis signal line i of the other switch matrix; and means whereby an input signal on Y-axis signal line j, this signal having been input from another switch matrix, is output from X-axis signal line k of the local switch matrix as a signal instructing the writing of a command to a control module k that is dealt with by the local switch matrix.
When constructing, by way of example, a large-scale control system employing more control modules than a single switch matrix can deal with, a plurality of switch matrices can be utilized in this way as the equivalent of a single large-scale switch matrix. It follows that by providing in advance a plurality of switch matrices of fixed scale, any increase or decrease in the number of control modules can be dealt with right away.